package com.zsrt.java.day20161226.wrl.demo03;

import java.util.Scanner;

public class Work03 {
	/**
	 * 求出两个数较大值
	 */
	/*@Test
	public void w03(){
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入第一个数：\n");
		int a = sc.nextInt();
		System.out.println("请输入第二个数：\n");
		int b = sc.nextInt();
		sc.close();		
		System.out.println("a = "+a+";\tb = "+b);	
		System.out.println("最大值为："+Math.max(a, b));
	}*/
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入第一个数：\n");
		int a = sc.nextInt();
		System.out.println("请输入第二个数：\n");
		int b = sc.nextInt();
		sc.close();		
		System.out.println("最大值为："+work03(a, b));
	}
	
	/**
	 * 去两数的较大值
	 * @param a	数1
	 * @param b	数2
	 * @return	较大值
	 */
	public static int work03(int a ,int b){
		System.out.println("a = "+a+";\tb = "+b);	
		return Math.max(a, b);
	}
}
